package com.practice;

import java.util.Scanner;

public class demo02 {
    public static void main(String[] args) {
        //创建扫描器
        Scanner sc = new Scanner(System.in);
        //定义变量来接收分数
        //再用死循环不断判断分数录入是否正确，直到正确结束
        for (; ; ) {
            System.out.println("请输入你的分数:");
            int score = sc.nextInt();
            if (score < 0 || score > 100) {
                System.out.println("您输入的分数有误，请重新输入");
                continue;
            } else {
                if (score >= 95) {
                    System.out.println("游戏机");
                    break;
                } else if (score >= 90 && score < 95) {
                    System.out.println("游乐园");
                    break;
                } else if (score >= 80 && score < 90) {
                    System.out.println("chocolate");
                    break;
                } else {
                    System.out.println("打一顿");
                    break;
                }
            }
        }
    }
}
